﻿@model BYSJ.Web.Models.AnswerViewModel
@{
    ViewBag.Title = "showAnswer";
    Layout = "~/Views/huDong/HuDong.cshtml";
}
@section answer{
    <div class="answerdaohang">
        <div class="l_thread_info">
            <ul class="l_posts_num">
                <li class="l_pager pager_theme_4 pb_list_pager"></li>
                <li class="l_reply_num" style="margin-left:8px"><span class="red" style="margin-right:3px">0</span>回复贴，共<span class="red">1</span>页</li>
                <li class="l_reply_num"></li>
            </ul>
            <div id="tofrs_up" class="tofrs_up"><a href="/huDong/@Model.name" title="问题列表">&lt;返回问题别表</a></div>
        </div>
        @*<div class="l_thread_manage">
            <div class="d_del_thread"><a class="j_thread_delete" href="#">删除主题</a></div>
        </div>*@
    </div>
    <div class="answecontent">
        <div class="core_title_wrap_bright clearfix" id="j_core_title_wrap">
            <h3 class="core_title_txt pull-left text-overflow  " title="" style="width: 416px">
                @Model.firsttopviewmodel.title
            </h3>
            <span class="core_title_btns pull-right">
                @*<a href="#"> 只看楼主</a>
                <a href="#" class="btn-sub btn-small j_favor">收藏</a>*@
                <a id="quick_reply" class="btn-small btn-sub j_quick_reply">回复</a>
            </span>
        </div>
        <div style="overflow:hidden;zoom:1;">
            <div class="xiongda">
                <a class="yincangyu">@Model.firsttopviewmodel.firstimage</a>
                <a class="xiangdatouxiang" href="#"><img class="touxiangbejing" alt="" /></a>
                <a href="#">@Model.firsttopviewmodel.firstname</a>
            </div>
            <div class="xionger">
                <div class="content">
                    @Html.Raw(@Model.firsttopviewmodel.content)
                </div>

                <div class="buttone">
                    <span class="tail-one">1楼</span>
                    <span class="tail-info">@Model.firsttopviewmodel.answertime.ToString("yyyy-MM-dd HH:mm:ss")</span>
                    <a class="buttonhuifu"><span>回复</span></a>
                </div>
            </div>
        </div>
        <div class="genquesting">
            @for (int i = 0; i < @Model.questinglist.Count; i++)
            {
                <div class="backziduan">
                    <div class="xiongda">
                        <a class="yincangyu">@Model.questinglist[i].firstimage</a>
                        <a class="xiangdatouxiang" href="#"><img class="touxiangbejing" alt="" /></a>
                        <a class="biasohiziduan">@Model.questinglist[i].firstname</a>
                    </div>
                    <div class="xionger">
                        <div class="content">
                            @Html.Raw(@Model.questinglist[i].content)
                        </div>

                        <div class="buttone">
                            <span class="tail-one">@(i + 2)楼</span>
                            <span class="tail-info">@Model.questinglist[i].questingtime.ToString("yyyy-MM-dd HH:mm:ss")</span>
                            <a href="#" class="buttonhuifu"><span>回复</span></a>
                        </div>

                    </div>
                    <div class="clf"></div>
                    <div class="zihuifu">
                        <div class="zihuifucontent">
                            @*循环出来子回复*@
                            @if (@Model.questinglist[i].huifuview != null)
                        {
                            for (int x = 0; x < @Model.questinglist[i].huifuview.Count; x++)
                            {
                        <div class="zihuifucon">
                            <a class="zihuifuimage">
                                <img src="http://cnkifile.b0.upaiyun.com/bysjdefort/touxiang.jpg" alt="" />
                            </a>
                            <p>
                                <span class="zihuifuconfirst">@Model.questinglist[i].huifuview[x].huifuzhe</span>
                                <span>回复 :</span>
                                <span class="zihuifucontwo">@Model.questinglist[i].huifuview[x].beihuifuzhe</span>
                                @Model.questinglist[i].huifuview[x].content
                            </p>
                        </div>
                            }
                        }

                            <div class="zihuifucon zihuifuconbutton">
                                <button class="shuo">我也说一句</button>
                                <button class="bushuo" style="display:none;margin-bottom:5px;">不说了</button>
                                <div class="zihuifuconfabiao">
                                    <form method="post" action="/add/addhuifu" id="zihuifuconfabiaofrom">
                                        <input type="hidden" name="questingid" value="@Model.questinglist[i].questingid" />
                                        <textarea class="zishuruwenben" name="content"></textarea>
                                        <input type="submit" id="zihuifufabiao" value="发表">
                                    </form>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            }
        </div>
        <div class="emptyanswer">
            <div class="huifufrom">
                <form action="/showAnswer/addQuesting" method="post">
                    <input type="text" name="answerid" style="display:none" value="@Model.firsttopviewmodel.answerid" />
                    <textarea class="shuruwenben" name="content"></textarea>
                    <br />
                    <input type="submit" value="发表" class="btn btn-embossed btn-primary">
                </form>

            </div>
        </div>

    </div>
}